package com.sharedprint.system.area.service;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sharedprint.system.area.mapper.AreaInfoMapper;
import com.sharedprint.system.area.pojo.AreaInfo;

/**
 * 地区服务的实现类
 * @author Administrator
 *
 */
@Service
public class AreaInfoServiceImpl implements AreaInfoService {
	@Autowired
	private AreaInfoMapper areaInfoMapper;
	@Override
	public int findCount(Map<String, Object> searchMap) {
		return areaInfoMapper.findCount(searchMap);
	}
	
	@Override
	public List<Map<String, Object>> findPageList(Map<String, Object> searchMap) {
		return areaInfoMapper.findPageList(searchMap);
	}

	@Override
	public int saveInfo(AreaInfo areaInfo) {
		int result = areaInfoMapper.insert(areaInfo);
		return result;
	}

	@Override
	public int updateInfo(AreaInfo areaInfo) {
		int result = areaInfoMapper.updateByPrimaryKey(areaInfo);
		int i = 1/0;
		return result;
	}

	@Override
	public int deleteInfo(Map<String, Object> searchMap) {
		return areaInfoMapper.deleteInfo(searchMap);
	}

}
